@(uid:Long,uname:String)
<div class="topbar" id="topbar">
  <div class="ntopbar_main">
    <div class="ntopbar_floatL">
      <div><script type="text/javascript">(function(){document.write(unescape('%3Cdiv id="bdcs"%3E%3C/div%3E'));var bdcs = document.createElement('script');bdcs.type = 'text/javascript';bdcs.async = true;bdcs.src = 'http://znsv.baidu.com/customer_search/api/js?sid=17542041042688205263' + '&plate_url=' + encodeURIComponent(window.location.href) + '&t=' + Math.ceil(new Date()/3600000);var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(bdcs, s);})();</script>
      </div>
    </div>

    <div class="ntopbar_menu">

    @if(uid == 0L){
      <div class="dropdown">
        <span class="link" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">
          <a href="/">注册/登录</a>|
        </span>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
          <li><a href="javascript:;" onclick="toLogin()">登录</a></li>
          <li><a href="javascript:;" onclick="toLogin()">注册</a></li>
          <li><a href="/blog/reset/password">修改密码</a></li>
        </ul>

        @*<span class="link" ><a href="@routes.Application.archives()">归档</a>|</span>*@
        <span class="link" ><a href="javascript:;" onclick="toNewArticle()">发博客</a>|</span>
        <span class="link" ><a href="@routes.HomeController.toMessage()">留言</a></span>
      </div>
    }else{
      <div class="dropdown" style="float: left;">
        <span class="link" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">
          <a href="/">@uname</a>|
        </span>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
          @*<li><a href="/blog/to/login">个人资料修改</a></li>*@
          <li><a href="/blog/reset/password">修改密码</a></li>
          <li><a href="@routes.HomeController.logOut()">退出</a></li>
        </ul>
      </div>

      <div class="dropdown" style="float: left;">
        <span class="link" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">
          <a href="@routes.HomeController.userCenter()">个人中心</a>|
        </span>
        <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
          <li><a href="@routes.HomeController.myblogs(uid)">我的博客</a></li>
        </ul>

        @*<span class="link" ><a href="@routes.Application.archives()">归档</a>|</span>*@
        <span class="link" ><a href="@routes.HomeController.toNewArticle()">发博客</a>|</span>
        <span class="link" ><a href="@routes.HomeController.toMessage()">留言</a></span>
      </div>
    }

    </div>
  </div>
</div>

<script type="text/javascript">

    function toLogin(){
      window.location.href="/blog/login?url="+window.location.href
    }

    function toNewArticle(){
      window.location.href="@routes.HomeController.toNewArticle()"+"?url="+window.location.href
    }
  </script>